package com.doit.day05

import scala.io.Source

object _模拟spark {
  def main(args: Array[String]): Unit = {

    val movies: Iterator[String] = Source.fromFile("C:\\Users\\34650\\Desktop\\课程资料\\资料\\movies.txt").getLines()

    val ratings: Iterator[String] = Source.fromFile("C:\\Users\\34650\\Desktop\\课程资料\\资料\\ratings.txt").getLines()


    val value: Iterator[(String, (String, String))] = movies.map(line => {
      val arr: Array[String] = line.split("_")
      //电影id    电影名称   电影类型、
      println("你大爷的")
      (arr(0), (arr(1), arr(2)))
    }
    )


    value.foreach(println)


  }

}
